package com.cmict.data.infra.service.message.job;

import com.cmict.data.framework.quartz.core.handler.JobHandler;
import com.cmict.data.infra.service.message.AnnouncementService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * 定时通知 Job
 *
 * @author awesome
 */
@Service("ScheduledNotifyJob")
@Slf4j
public class ScheduledNotifyJob implements JobHandler {

    @Resource
    private AnnouncementService announcementService;

    @Override
    public String execute(String param) throws Exception {
       announcementService.sendAnnouncement(Long.valueOf(param));
        return String.format("发送定时通告 %s ", param);
    }

}
